﻿using System.Data;
using System.Data.OracleClient;

namespace SummerSmile.Common.Utils.Data.DBFactory
{
    public class OracleFactory:IDBFactory
    {
        public IDbConnection CreateConnection()
        {
            return new OracleConnection();
        }

        public IDbCommand CreateCommand()
        {
            return new OracleCommand();
        }

        public IDbDataAdapter CreateDataAdapter(IDbCommand cmd)
        {
            return new OracleDataAdapter((OracleCommand)cmd);
        }

        public string GetDateTimeString(string datetime)
        {
            return "to_date('" + datetime + "','yyyy-MM-dd')";
        }

      

     
    }
}
